<?php

header("Content-Type:text/html;charset=UTF8");
header("Server: Liyong", true);

/* test  */
$name = $_REQUEST['name'];
$pass = $_REQUEST['pass'];
$arr = array(
	'name'=>$name,
	'pass'=>$pass
	);
/* 处理中文编码问题 */
foreach ( $arr as $key => $value ) {   
	       $arr[$key] = urlencode ( $value );   
	    }
	    
$result = urldecode(json_encode($arr));
echo $result;

file_put_contents('test.log', $result);

/* 获得请求header,即客户端相应信息*/
//$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$header='';
foreach(getallheaders() as $key => $value){$header.=$value;}
file_put_contents('output.log', $header);